import { Module } from '@nestjs/common';
//论坛接口和服务
import { ForumController } from './forum/controller';
import { ForumService } from './forum/service';
// 引入数据库的及配置文件
import { TypeOrmModule } from '@nestjs/typeorm';
import { ForumMoudule } from './forum/module';

@Module({
  imports: [
     TypeOrmModule.forRoot({
      type: 'mysql',
      host: '127.0.0.1',
      port: 3306,
      username: 'root',
      password: '11111111',
      database: 'xinyu',
      entities: [__dirname + '/**/*.entity{.ts,.js}'],
      synchronize: false,
      autoLoadEntities:true,
     }),
    ForumMoudule
  ],
  
  // controllers: [ForumController],
  // providers: [ForumService],
})
export class RootModule {}
